package com.laf.service.impl;

import com.laf.mapper.LeaveMapper;
import com.laf.model.Leave;
import com.laf.model.Notice;
import com.laf.service.LeaveService;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: He Changjie  on  2018-10-01
 * @description:
 */
@Service("leaveService")
public class LeaveServiceImpl implements LeaveService {

    @Resource
    LeaveMapper mapper;

    @Override
    public List<Leave> findByNoticeId(String noticeId) {
        return mapper.findByNoticeId(Integer.parseInt(noticeId));
    }

    @Override
    public int save(Leave leave) {
        return mapper.save(leave);
    }
}
